import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/css/pablic.css'
Vue.config.productionTip = false
import *  as API from '@/http/api'
Vue.prototype.$API=API


import Moment from 'moment'

//处理时间戳
Vue.filter('datatime',function(v){
      console.log(v) 
      return Moment(v*1000).format('YYYY年MM月DD日hh:mm:ss')

})

//定义等级过滤器
Vue.filter('rank',function(v){
   console.log(v) 
   let result;
   switch(v){
      case'0':result='一级';break;
      case'1':result='二级';break;
      case'2':result='三级';break;
      default:result='没有这个级别';break;

   }
   return result

})



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
